import request from '@/utils/request';
import store from '@/store'

export function add(data) {
    const params = {
      ...data,
      createUserId: store.getters.userId,
      updateUserId: store.getters.userId
    }
    return request({
      url: '/maintain/maintain/productPedigree/add',
      method: 'post',
      data: params
    })
}

export function edit(data) {
    const params = {
      ...data,
      createUserId: store.getters.userId,
      updateUserId: store.getters.userId
    }
    return request({
      url: '/maintain/maintain/productPedigree/edit',
      method: 'post',
      data: params
    })
}

export function remove(data) {
    return request({
      url: '/maintain/maintain/productPedigree/delete/' + data,
      method: 'delete'
    })
}
